<template>
  <!-- 明细清单明细页面弹出框-->
  <el-dialog
    title="明细清单明细"
    center
    :visible.sync="openStatus"
    width="1024px"
    :close-on-click-modal="false"
    :append-to-body="true"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="detailsData" label-width="180px" :disabled="true">
      <div v-if="detailsType == 'A104'">
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="征收机关大类代码：" prop="deptCode">
              <el-select v-model="detailsData.deptCode" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.DEPT_CODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="预算科目代码：" prop="subjectCode">
              <el-input v-model="detailsData.subjectCode" placeholder="预算科目代码" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="发生额货币种类：" prop="incurredCurcd">
              <el-input v-model="detailsData.incurredCurcd" placeholder="发生额货币种类" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="发生额：" prop="incurredAmount">
              <el-input v-model="detailsData.incurredAmount" placeholder="发生额" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>

      <div v-if="detailsType == 'A307'">
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="兑付国债银行大类：" prop="debtBankType">
              <el-select v-model="detailsData.debtBankType" placeholder="请选择" style="width: 100%">
                <el-option
                  v-for="dict in dictMap.DEBT_BANK_TYPE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本金代码：" prop="capitalCode">
              <el-input v-model="detailsData.capitalCode" placeholder="本金代码" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="本金金额币种：" prop="capitalCurcd">
              <el-input v-model="detailsData.capitalCurcd" placeholder="本金金额币种" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="本金金额：" prop="capitalAmount">
              <el-input v-model="detailsData.capitalAmount" placeholder="本金金额" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="利息代码：" prop="accrualCode">
              <el-input v-model="detailsData.accrualCode" placeholder="利息代码" />
            </el-form-item>
          </el-col>
          <el-col :span="12"></el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="利息金额币种：" prop="accrualCurcd">
              <el-input v-model="detailsData.accrualCurcd" placeholder="利息金额币种" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="利息金额：" prop="accrualAmount">
              <el-input v-model="detailsData.accrualAmount" placeholder="利息金额" />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </el-form>
  </el-dialog>
</template>
<script>
import { log } from "util";
export default {
  name: "TableDetail",
  components: {},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    detailsData: {
      type: Object,
      default: () => {
        return {};
      },
    },
    detailsType: {
      type: String,
      default: "",
    },
  },
  data() {
    return {
      // 是否显示弹出层
      openStatus: false,
    };
  },
  mounted() {},
  watch: {},
  methods: {
    closeFn() {
      this.openStatus = false;
    },
    show() {
      this.openStatus = true;
    },
  },
};
</script>
